package com.Springexample.demo.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")  //将该类中的方法映射到/test下
public class TestController {

    @RequestMapping("/hello")  //将该方法映射到/test/hello下
    public String hello() {
        return "Hello World!";
    }
}
